#!/bin/bash
. /etc/profile
#bash deploy.sh > /dev/null 2>&1 &
#cd /usr/local/docker/dev-my-hello
project_path=$(cd `dirname $0`; pwd)
project_name="${project_path##*/}"
if [ -n "$DIR_NAME" ];then
	DIR_NAME=$DIR_NAME
else
	DIR_NAME=$project_name
fi

# 切换到文件夹
cd /usr/local/docker/$DIR_NAME

#激活环境
#SPRING_PROFILES_ACTIVE=${myprofile}
if [ -n "$myprofile" ];then
	SPRING_PROFILES_ACTIVE=$myprofile
else
	SPRING_PROFILES_ACTIVE=dev
fi
echo "SPRING_PROFILES_ACTIVE=$SPRING_PROFILES_ACTIVE"
echo "SPRING_PROFILES_ACTIVE=$SPRING_PROFILES_ACTIVE" >> ./deploy.log
export SPRING_PROFILES_ACTIVE=$SPRING_PROFILES_ACTIVE && nohup bash ./deploy.sh > ./deploy.log 2>&1 &
sleep 20s
